package cn.middle.swap.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.middle.common.base.mapper.BaseMapper;
import com.middle.common.base.service.impl.BaseServiceImpl;
import com.middle.common.result.Page;

import cn.middle.swap.entity.CallChain;
import cn.middle.swap.mapper.CallChainMapper;
import cn.middle.swap.service.CallChainService;

@Service
public class CallChainServiceImpl extends BaseServiceImpl<CallChain> implements CallChainService {

	@Autowired
	private CallChainMapper mapper;
	@Override
	public BaseMapper<CallChain> getDao() {
		return mapper;
	}
	@Override
	public Page<CallChain> listConditions(int page, int pageSize, String messageId, String interfaceName) {
		PageHelper.startPage(page,pageSize);
		List<CallChain> lists =  mapper.listConditions(messageId, interfaceName);
		return new Page<>(new PageInfo<>(lists));
	}
}
